﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/LOSSite.Master" Inherits="System.Web.Mvc.ViewPage<DataAccessLayer.Models.FacilityOverDraft>" %>

<asp:Content ID="cntForm" ContentPlaceHolderID="Content" runat="server">
    <script src="<%= Url.Content("~/Scripts/MicrosoftAjax.js") %>" type="text/javascript"></script>
    <script src="<%= Url.Content("~/Scripts/MicrosoftMvcAjax.js") %>" type="text/javascript"></script>
    <script src="<%= Url.Content("~/Scripts/MicrosoftMvcValidation.js") %>" type="text/javascript"></script>

    <h2>Edit</h2>

    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>
        
        <fieldset>
            <legend>Fields</legend>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.FacilityId) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.FacilityId) %>
                <%: Html.ValidationMessageFor(model => model.FacilityId) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.AppId) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.AppId) %>
                <%: Html.ValidationMessageFor(model => model.AppId) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.FacilityName) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.FacilityName) %>
                <%: Html.ValidationMessageFor(model => model.FacilityName) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.RepaymentAmount) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.RepaymentAmount, String.Format("{0:F}", Model.RepaymentAmount)) %>
                <%: Html.ValidationMessageFor(model => model.RepaymentAmount) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.RepaymentPeriod) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.RepaymentPeriod) %>
                <%: Html.ValidationMessageFor(model => model.RepaymentPeriod) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.RepaymentUnit) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.RepaymentUnit) %>
                <%: Html.ValidationMessageFor(model => model.RepaymentUnit) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.LimitAmount) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.LimitAmount, String.Format("{0:F}", Model.LimitAmount)) %>
                <%: Html.ValidationMessageFor(model => model.LimitAmount) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.AdminFee) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.AdminFee, String.Format("{0:F}", Model.AdminFee)) %>
                <%: Html.ValidationMessageFor(model => model.AdminFee) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.CancelFee) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.CancelFee, String.Format("{0:F}", Model.CancelFee)) %>
                <%: Html.ValidationMessageFor(model => model.CancelFee) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.TenorPeriod) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.TenorPeriod) %>
                <%: Html.ValidationMessageFor(model => model.TenorPeriod) %>
                <%= Html.DropDownListFor(model => model.TenorUnit, (SelectList)ViewData["PeriodList"])%>&nbsp;<%: Html.ValidationMessageFor(model => model.TenorUnit) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Version) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Version, String.Format("{0:g}", Model.Version)) %>
                <%: Html.ValidationMessageFor(model => model.Version) %>
            </div>
            
            <p>
                <input type="submit" value="Save" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%: Html.ActionLink("Back to List", "Index") %>
    </div>

</asp:Content>

